from typing import TYPE_CHECKING
import logging

logger = logging.getLogger(__name__)

try:
    from .api_response_utils import (create_error_response, create_success_response, validate_request)
    API_UTILS_AVAILABLE = True
except Exception as e:
    logger.warning("api_response_utils模块加载失败: %s", str(e))
    API_UTILS_AVAILABLE = False

try:
    from .logger_config import LoggerConfig
    LOGGER_CONFIG_AVAILABLE = True
except Exception as e:
    logger.warning("logger_config模块加载失败: %s", str(e))
    LOGGER_CONFIG_AVAILABLE = False

try:
    from .path_utils import PathUtils
    PATH_UTILS_AVAILABLE = True
except Exception as e:
    logger.warning("path_utils模块加载失败: %s", str(e))
    PATH_UTILS_AVAILABLE = False

# 可选导入（根据实际需求启用）
if not TYPE_CHECKING:
    __all__ = ['LoggerConfig', 'PathUtils']
    if API_UTILS_AVAILABLE:
        __all__.extend(['create_error_response', 'create_success_response', 'validate_request'])